# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-seedir
pkgver=0.5.0
pkgrel=0
pkgdesc="Python package for creating, editing, and reading folder tree diagrams"
url="https://github.com/earnestt1234/seedir"
arch="noarch"
license="MIT"
depends="py3-natsort"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/earnestt1234/seedir/archive/refs/tags/v$pkgver/py3-seedir-$pkgver.tar.gz"
builddir="$srcdir/seedir-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
e6c257787e65c24697e76f75308dc5e8c2f919205a4922aa1bb66673000e2c784959ebe45a7ccd826d3ee1fea03fe0a6a64f6c90321c76d1e36ab68ba3962361  py3-seedir-0.5.0.tar.gz
"
